import axios from 'axios';
let request = axios.create()
// import request from '@/utils/request';
//获取新闻列表
export const getNewsList = (id) => request({url:`http://127.0.0.1:3000/api/detail/showDetail?cs_id=${id}`,method:'get'})
//添加新闻
export const addNewRequest = (data) => request({url:'http://localhost:3000/api/detail/addDetail',method:'post',data})
//修改新闻
export const saveEditNewRequest = (id,data) => request({url:`http://localhost:3000/api/detail/updateDetail?id=${id}`,method:'post',data})
//删除新闻
export const deleteNewRequest = (id) => request({url:`http://localhost:3000/api/detail/deleteDetail?id=${id}`,method:'delete'})